/*
 * @Description: 应用中心列表列定义
 * @Author: seadon
 * @LastEditors: seadon
 * @Date: 2021-07-23 17:40:16
 * @LastEditTime: 2021-07-23 17:52:05
 */
import { i18n } from '@/locales'
import EllipsisTooltip from '@/entry_desktop/components/EllipsisTooltip'
const { $t } = i18n

const listColumn = [
	{
		title: $t('pages.application.column.name', '名称'),
		dataIndex: 'name',
		customRender: ({ text, record }: { text: string; record: any }) => (
			<div class="list-table-name">
				<img src={record.icon} />
				<EllipsisTooltip title={text} class="name-text" />
			</div>
		),
	},
	{
		title: $t('pages.application.column.description', '描述'),
		dataIndex: 'descript',
		customRender: ({ text }: { text: string }) => (
			<EllipsisTooltip title={text} />
		),
	},
	{
		title: $t('pages.application.column.contact', '联系人'),
		dataIndex: 'user_bo',
		width: 180,
		slots: {
			customRender: 'custom-contact',
		},
	},
	{
		title: $t('pages.application.column.operate', '操作'),
		dataIndex: 'operation',
		width: 100,
		align: 'center',
		slots: {
			customRender: 'operation',
		},
	},
]

export default listColumn
